<!DOCTYPE html>
<html>
<head lang="en">
  <meta charset="UTF-8">
  <title>Blog</title>
  <!--<link rel="stylesheet" href="/stylesheets/style.css">-->
  <link rel="stylesheet" href="/stylesheets/bootstrap.min.css">
    <style>
        *{
            margin:0;
            padding:0;
            box-sizing: border-box;
        }
        header h1{
            padding:10px;
            font-size:16px;
        }
        header {
            width:100%;
            text-align: center;
        }

    </style>
</head>
<body>
<div class="container">
    <ul class="nav nav-tabs">
        <% if (user) { %>
        <li role="presentation" class="active">
            <a title="发表" href="/post">发表</a>
        </li>
        <li role="presentation">
            <a title="退出" href="/logout">退出</a>
        </li>
        <% } else {%>
        <li role="presentation">
            <a title="登录" href="/login">登录</a>
        </li>
        <li>
            <a title="注册" href="/reg">注册</a>
        </li>
        <% } %>
    </ul>

    <header>
        <h1><%- title %></h1>
    </header>




<article>
    <% if(success) { %>
    <div><%= success %></div>
    <% } %>
    <% if (error) { %>
    <div><%= error %></div>
    <% } %>
